<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>
<script>
    // let timer;
    // window.onscroll  = function () {
    //     if(timer){
    //         clearTimeout(timer)
    //     }
    //     timer = setTimeout(function () {
    //         //滚动条位置
    //         let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
    //         console.log('滚动条位置：' + scrollTop);
    //         timer = undefined;
    //     },200)
    // }
    // console.log('===')
    arr=[7,6,9,22,1,55,67,1]
    function bubbleSort(arr) {
        for (let i = 0; i < arr.length - 1; i++) {
            for (let j = 0; j < arr.length - 1 - i; j++) {
                if (arr[j] > arr[j + 1]) {
                    let tem = arr[j];
                    arr[j] = arr[j + 1];
                    arr[j + 1] = tem;
                }
            }
        }
    }

    console.log( bubbleSort())



</script>
